#include <stdio.h>

#define HUNDREDS(a)	((a) / 100)
#define TENS(a)		(((a) / 10) % 10)
#define ONES(a)		((a) % 10)

int
main(void)
{
	register int a;

	for (a = 102; a <= 987; a++)
		if (HUNDREDS(a) != TENS(a) &&
				TENS(a) != ONES(a) &&
				ONES(a) != HUNDREDS(a))
			printf("%d\n", a);

	return 0;
}
